import request from '@/utils/request'
import { processApiUrl } from '../config'

/*
  流程管理
*/

/**
 * 流程管理列表
 * @param data
 */
 export function processListByPage(params){
    return request({
      url: `${processApiUrl}/cms/process/listByPage`,
      method: 'post',
      params
    })
  } 

  /**
 * 流程管理分类字段
 * @param data
 */
 export function processCategory(params){
    return request({
      url: `${processApiUrl}/cms/process/category`,
      method: 'get',
      params
    })
  } 
    /**
 * 流程管理查看
 * @param data
 */
 export function generateImage(params){
    return request({
      url: `${processApiUrl}/cms/process/generateImage/${params}`,
      method: 'get',
    })
  } 

      /**
 * 流程管理配置
 * @param data
 */
 export function processAddConfig(data){
    return request({
      url: `${processApiUrl}/cms/process/addConfig`,
      method: 'post',
      data
    })
  } 
 /**
 * 根据key获取配置
 * @param data
 */
 export function getConfig(data){
    return request({
      url: `${processApiUrl}/cms/process/config?modelKey=${data}`,
      method: 'get',
    })
  } 